/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nanosl.minix.fxml;

import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;

/**
 * FXML Controller class
 *
 * @author J.Sandun
 */
public class CustomerViewController implements Initializable {
    @FXML
    private TextField codeTextField;
    @FXML
    private TextField nameTextField;
    @FXML
    private TextField addressTextField;
    @FXML
    private TextField mobileTextField;
    @FXML
    private TextField fixTextField;
    @FXML
    private Button clearButton;
    @FXML
    private Button addButton;

    /**
     * Initializes the controller class.
     */
    @Override
    public void initialize(URL url, ResourceBundle rb) {
        // TODO
    }    

    @FXML
    private void gotoName(ActionEvent event) {
        nameTextField.requestFocus();
    }

    @FXML
    private void gotoAddress(ActionEvent event) {
        addressTextField.requestFocus();
        
    }

    @FXML
    private void gotoMobile(ActionEvent event) {
        mobileTextField.requestFocus();
    }

    @FXML
    private void gotoFix(ActionEvent event) {
        fixTextField.requestFocus();
    }

    @FXML
    private void gotoAddButton(ActionEvent event) {
        addButton.requestFocus();
    }

    @FXML
    private void clear(ActionEvent event) {
        codeTextField.setText("");
        nameTextField.setText("");
        addressTextField.setText("");
        mobileTextField.setText("");
        fixTextField.setText("");
        
    }

    @FXML
    private void add(ActionEvent event) {
        
        
    }
}
